#include <stdio.h>
#include <string.h>
#include<assert.h>

void* my_memcpy(void*dest,void*src,int num)
{
	char* ret = dest;
	assert(dest && src);
	while (num--)
	{
		*(char*)dest = *(char*)src;
		dest = (char*)dest + 1;
		src = (char*)src + 1;
	}

	return ret;
}

int main()
{
	int a1[10] = { 1,2,3,4,5,6,7,8,9,10 };
	int a2[10] = { 0 };
	void*ret=my_memcpy(a2, a1, 5 * sizeof(int));
	return 0;
}